import Data.FileData;

import javax.mail.internet.InternetAddress;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.Socket;

public class test {
    public static void main(String[] args) throws IOException {
        Socket socket=new Socket(new InternetAddress().getAddress(),8888);
        FileData fileData=new FileData();
        File file=new File("E:\\JDK\\QQClient\\nox\\src\\img\\1.jpg");
        byte[] filebytes=new byte[(int)file.length()];
        FileInputStream fileInputStream=new FileInputStream(file);
        fileInputStream.read(filebytes);

//        fileData.setBytes(filebytes);
//        fileData.setLen((int) file.length());
//        fileData.setSender("lxh");
//        fileData.setFilename(file.getName());
//        SendMassage.setSocket(socket);
//        event massage=new event();
//        massage.setT(fileData);
//        massage.setType(MassageType.Send_File_To_One);
//        new SendMassage().sendMassage(massage);

        fileInputStream.close();
        socket.close();
    }
}
